<include file="public@header" />
</head>
<body>
    <div class="layui-fluid js-check-wrap">
        <div class="layui-card">
            <div class="layui-card-header well">
                <div class="layui-col-xs6">
                    <h3>留言诉求列表</h3>
                </div>
                <div class="layui-col-xs6 text-right">
                    <!-- <a href="{:url('AdminMessage/add')}" class="layui-btn layui-btn-normal">添加制度文章</a> -->
                </div>
            </div>

            <div class="layui-card-body">
                <table class="layui-table" >
                    <thead>
                        <tr>
                            <th width="50">ID</th>
                            <th>类型</th>
                            <th>相关部门</th>
                            <th>联系人</th>
                            <th>电话</th>
                            <th>内容</th>
                            <th>图片</th>
                            <th>提交时间</th>
                            <th>回复内容</th>
                            <th>回复时间</th>
                            <th>回复人员</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <foreach name="data" item="vo">
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$sort[$vo['type']]}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.user_login}</td>
                            <td>{$vo.mobile}</td>
                            <td>{$vo.content}</td>
                            <td>
                                <notempty name="vo.imgs">
                                    <php>
                                        $arr = json_decode($vo['imgs'],true);
                                    </php>
                                    <volist name="arr" id='v'>
                                    <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($v)}');">
                                        <i class="fa fa-photo fa-fw"></i>
                                    </a>
                                    </volist>
                                </notempty>
                            </td>
                            <td>{:date("Y-m-d H:i:s",$vo['time'])}</td>
                            <td>{$vo.reply}</td>
                            <td><notempty name="$vo['reply_time']">{:date("Y-m-d H:i:s",$vo['reply_time'])}</notempty></td>
                            <td>{$admin_user[$vo['reply_user_id']]}</td>
                            <td>
                                <if condition="cmf_get_current_admin_id() eq 1 || cmf_get_current_admin_id() eq 14">
                                    <a href="javascript:parent.openIframeLayer('{:url('AdminMessage/reply',array('id'=>$vo['id']))}','{$vo.id}回复管理',{});" class="layui-btn layui-btn-normal layui-btn-xs">指定回复人员</a>
                                </if>
                                    <if condition="$vo['reply'] eq ''">
                                    <a href="{:url('AdminMessage/edit',array('id'=>$vo['id']))}" class="layui-btn layui-btn-xs">回复</a>
                                    </if>
                                <a href="{:url('AdminMessage/delete',array('id'=>$vo['id']))}" class="js-ajax-delete layui-btn layui-btn-danger layui-btn-xs">{:lang('DELETE')}</a>
                            </td>
                        </tr>
                        </foreach>
                    </tbody>
                </table>
            </div>
        </div>        
    </div>

<include file="public@footer"/>
